package day3;

import org.junit.experimental.max.MaxCore;
//方法实例
public class MethodTest {
	public static void main(String[] args) {
		int num1 = 3;
		int num2 = 5;
	//方法的调用是：方法名（参数）
	//实参
		int result = max(num1,num2);
				
		System.out.println(result);		
	}
	
	
	//方法的定义,定义方法时尽量只完成一件事
	//形参
	public static int max(int num1,int num2) {
		int max = 0;
		if (num1 > num2) {
			max = num1;
		}else {
			max = num2;
		}
		return max;
	}
}
